// WzPageAniType.cpp : implementation file
//

#include "stdafx.h"
#include "ansieditor.h"
#include "WzPageAniType.h"
#include "WzPageAniTypeFrame.h"
#include "WzPageAniTypeDelay.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CWzPageAniType dialog


CWzPageAniType::CWzPageAniType(CWnd* pParent /*=NULL*/)
	: CWizardPage(CWzPageAniType::IDD, pParent)
{
	//{{AFX_DATA_INIT(CWzPageAniType)
	//}}AFX_DATA_INIT
	m_pFocusTarget = &m_optAniType;
}


void CWzPageAniType::DoDataExchange(CDataExchange* pDX)
{
	CWizardPage::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CWzPageAniType)
	DDX_Control(pDX, IDC_OPT_ANITYPE, m_optAniType);
	DDX_Control(pDX, IDC_OPT_DELAYTYPE, m_optAniType1);
	//}}AFX_DATA_MAP
	DDX_Radio(pDX, IDC_OPT_ANITYPE, m_pData->m_nAnimateType);
}


BEGIN_MESSAGE_MAP(CWzPageAniType, CWizardPage)
	//{{AFX_MSG_MAP(CWzPageAniType)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CWzPageAniType message handlers

BOOL CWzPageAniType::OnInitDialog()
{
	CWizardPage::OnInitDialog();

	m_pFocusTarget = m_pData->m_nAnimateType? &m_optAniType1: &m_optAniType;

	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

BOOL CWzPageAniType::ValidatePage()
{
	UpdateData();
	if(m_pData->m_nAnimateType == 0)
	{
		m_pNextPage = p_PageAniTypeFrame;
	}
	else
	{
		m_pNextPage = p_PageAniTypeDelay;
	}
	return TRUE;
}

BOOL CWzPageAniType::CanGoNext()
{
	return TRUE;
}

BOOL CWzPageAniType::IsLastPage()
{
	return FALSE;
}
